﻿using kelianxi.BLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace kelianxi.APl.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class UserController : ControllerBase
    {
        public UserController(UserBLL bll)
        {
            Bll = bll;
        }

        public UserBLL Bll { get; }


        /// <summary>
        /// 管理员登录
        /// </summary>
        /// <param name="name">管理员姓名</param>
        /// <param name="pwd">管理员密码</param>
        /// <returns></returns>
        [HttpGet("Login")]
        public dynamic Login(string name, string pwd)
        {
            try
            {
                return Bll.Login(name, pwd);

            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
    }
}
